unit uCad_Procedimentos;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, upai, EDBFind, StdCtrls, Grids, DBGrids, Mask, DBCtrls, DB,
  Buttons, ExtCtrls, ComCtrls;

type
  TfCad_Procedimentos = class(TfPai)
    Label1: TLabel;
    Label2: TLabel;
    DBEdit1: TDBEdit;
    DBEdit2: TDBEdit;
    DBGrid1: TDBGrid;
    GroupBox1: TGroupBox;
    EvDBFind1: TEvDBFind;
    EvDBFind2: TEvDBFind;
    Label3: TLabel;
    Label4: TLabel;
    procedure FormShow(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure btnIncluirClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fCad_Procedimentos: TfCad_Procedimentos;

implementation

uses UDM;

{$R *.dfm}

procedure TfCad_Procedimentos.FormShow(Sender: TObject);
begin
  inherited;
  if not DM.cds_procedimento.Active then
    DM.cds_procedimento.Open;
end;

procedure TfCad_Procedimentos.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  inherited;
  if DM.cds_procedimento.Active then
    DM.cds_procedimento.Close;

end;

procedure TfCad_Procedimentos.btnIncluirClick(Sender: TObject);
begin
  inherited;
  DBEdit1.SetFocus;
end;

end.
